package com.hl.order.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 商家收支明细对象 merchant_bill_detail
 * 
 * @author ruoyi
 * @date 2025-08-07
 */
public class MerchantBillDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private String id;

    /** 商户/租户ID */
    @Excel(name = "商户/租户ID")
    private String tenantId;

    /** 店铺名称 */
    @Excel(name = "店铺名称")
    private String storeName;

    /** 账单类型：商家自配送-配送费收入、用户下单、用户申请退款-配送费退回、用户申请退款... */
    @Excel(name = "账单类型：商家自配送-配送费收入、用户下单、用户申请退款-配送费退回、用户申请退款...")
    private String billType;

    /** 金额(元)，可正负 */
    @Excel(name = "金额(元)，可正负")
    private BigDecimal amount;

    /** 币种 */
    @Excel(name = "币种")
    private String currency;

    /** 记录消息，例如：订单号2147483647949 */
    @Excel(name = "记录消息，例如：订单号2147483647949")
    private String recordMsg;

    /** 订单号（从record_msg解析出的纯数字） */
    @Excel(name = "订单号", readConverterExp = "从=record_msg解析出的纯数字")
    private String orderNo;

    /** 支付/退款第三方流水号 */
    @Excel(name = "支付/退款第三方流水号")
    private String tradeNo;

    /** 用户支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 退款完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;

    /** 1正常 2已撤销 3冲正 */
    @Excel(name = "1正常 2已撤销 3冲正")
    private Long status;

    /** 其他扩展字段 */
    @Excel(name = "其他扩展字段")
    private String extra;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date createdAt;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date updatedAt;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setTenantId(String tenantId) 
    {
        this.tenantId = tenantId;
    }

    public String getTenantId() 
    {
        return tenantId;
    }

    public void setStoreName(String storeName) 
    {
        this.storeName = storeName;
    }

    public String getStoreName() 
    {
        return storeName;
    }

    public void setBillType(String billType) 
    {
        this.billType = billType;
    }

    public String getBillType() 
    {
        return billType;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setCurrency(String currency) 
    {
        this.currency = currency;
    }

    public String getCurrency() 
    {
        return currency;
    }

    public void setRecordMsg(String recordMsg) 
    {
        this.recordMsg = recordMsg;
    }

    public String getRecordMsg() 
    {
        return recordMsg;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setTradeNo(String tradeNo) 
    {
        this.tradeNo = tradeNo;
    }

    public String getTradeNo() 
    {
        return tradeNo;
    }

    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    public void setRefundTime(Date refundTime) 
    {
        this.refundTime = refundTime;
    }

    public Date getRefundTime() 
    {
        return refundTime;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setExtra(String extra) 
    {
        this.extra = extra;
    }

    public String getExtra() 
    {
        return extra;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tenantId", getTenantId())
            .append("storeName", getStoreName())
            .append("billType", getBillType())
            .append("amount", getAmount())
            .append("currency", getCurrency())
            .append("recordMsg", getRecordMsg())
            .append("orderNo", getOrderNo())
            .append("tradeNo", getTradeNo())
            .append("createTime", getCreateTime())
            .append("payTime", getPayTime())
            .append("refundTime", getRefundTime())
            .append("status", getStatus())
            .append("extra", getExtra())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
